import com.atguigu.gmall.bean.UserAddress;
import com.atguigu.gmall.service.impl.OrderServiceImpl;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;


/**
 * 模拟dubbo消费者
 */
public class MainApplication {
    public static void main(String[] args) throws InterruptedException {
        ClassPathXmlApplicationContext ios = new ClassPathXmlApplicationContext("consumer.xml");
        OrderServiceImpl orderService = ios.getBean(OrderServiceImpl.class);
        List<UserAddress> userAddresses = orderService.initOrder("1");
        System.out.println("调用结束。。。。。。。。。。。。。。");
        //进程睡眠，等待结果

        Thread.sleep(Long.MAX_VALUE);
    }
}
